package teach.shuji.java12.system.service;

import teach.shuji.java12.common.CommonResult;
import teach.shuji.java12.common.NoDataCommonResult;
import teach.shuji.java12.system.dto.roles.GetUserByRoleQuery;
import teach.shuji.java12.system.dto.roles.RoleAddDto;
import teach.shuji.java12.system.dto.roles.RoleListQuery;
import teach.shuji.java12.system.entity.Role;
import teach.shuji.java12.system.entity.User;

import java.util.List;

//3.设计服务接口
//  推荐各函数接收的数据单独建立一个类去接收
//4.自己按设计的接口接收参数和返回函数添加类，如：RoleAddDto类

// 难点：接口如何设计？接收和返回数据的确定
public interface RoleService {
    NoDataCommonResult add(RoleAddDto role);
    NoDataCommonResult edit(RoleAddDto role);
    NoDataCommonResult delete(long id);
    CommonResult<List<Role>> list(RoleListQuery query);

    CommonResult<List<User>> getUserByRoleId(GetUserByRoleQuery id);
}
